package com.vonzhou.springinaction.springidolaop;

/**
 * 音乐演奏家, 演示setter注入
 */
public class InstrumentaList implements Performer {
	private String song;
	private Instrument instrument;

	public InstrumentaList() {
	}

	@Override
	public void perform() throws PerformanceException {
		System.out.print("Playing " + song + " : ");
		instrument.play();
	}

	public String getSong() {
		return song;
	}

	public void setSong(String song) { //注入song
		this.song = song;
	}

	public String screamSong() {
		return song;
	}

	public void setInstrument(Instrument instrument) { // 注入 instrument
		this.instrument = instrument;
	}
}
